package com.lastproject.ejb.entities;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQuery;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@NamedQuery(name = "Report.findAll", query = "SELECT r FROM Report r")
public class Report implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1914702788249591523L;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "id")
	private int id;

	private String name;

	private String selClause;

	private String whereClause;
	
	private String fromClause;
	
	private String sortClause;

	private boolean isConfidential;

	@ManyToOne
	@JoinColumn(name = "idEmployee")
	private Employee employee;

	@Temporal(TemporalType.DATE)
	private Date date;

	
	public boolean isConfidential() {
		return isConfidential;
	}

	public void setConfidential(boolean isConfidential) {
		this.isConfidential = isConfidential;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSelClause() {
		return selClause;
	}

	public void setSelClause(String selClause) {
		this.selClause = selClause;
	}

	public String getWhereClause() {
		return whereClause;
	}

	public void setWhereClause(String whereClause) {
		this.whereClause = whereClause;
	}

	public Employee getEmployee() {
		return employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getFromClause() {
		return fromClause;
	}

	public void setFromClause(String fromClause) {
		this.fromClause = fromClause;
	}
	
	public String getSortClause() {
		return sortClause;
	}

	public void setSortClause(String sortClause) {
		this.sortClause = sortClause;
	}

}
